<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/header.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!-- 
	<link rel="stylesheet" type="test/css" gref="styles.css">
	 -->
	 
	<script type="text/javascript" name="javasc">
     function validate(f){
	 if(f.opassword.value.length==0){
		 alert("请输入原密码！");
		 f.opassword.focus();
		 return false;
	 }
	 if(f.opassword.value!="${loginUser.password}"){
		 alert("原密码不正确！");
		 f.opassword.focus();
		 return false;
	 }
	 if(f.password.value.length<4){
		 alert("新密码长度必须4以上！");
		 f.password.focus();
		 return false;
	 }
	 if(f.password.value!=f.rpassword.value){
		 alert("新密码和确认密码不一致！");
		 f.password.focus();
		 return false;
	 }
 }
</script>
</head>
<body>登录名：${loginUser.username}
	<form action="${ctx}/user/manager?func=update" method="post" onsubmit="return validate(this);">
	<input type="hidden" name="id" value="${loginUser.id}"/>
	用户名：<input type="test" name="username" value="${loginUser.username}"readonly/><br>
	原密码：<input type="password" name="password" /><br> 
	新密码：<input type="password" name="password" /><br> 
	确认密码：<input type="password" name="password" /><br>
	<input type="submit" name="submit" value="确定"/>
	</form>
	${message}
</body>
</html>